﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/Columns.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="SharingCenter.Web.Home.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    <%=this.currentProfile.NickName%>的首页
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../Content/home.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <%--<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="SharingCenter.Web.Classes.scDataContext"
        TableName="aspnet_Memberships" Where="UserId == @UserId &amp;&amp; IsApproved == @IsApproved">
        <WhereParameters>
            <asp:QueryStringParameter DbType="Guid" Name="UserId" QueryStringField="id" />
            <asp:Parameter DefaultValue="true" Name="IsApproved" Type="Boolean" />
        </WhereParameters>
    </asp:LinqDataSource>--%>

    <script src="Default.js" type="text/javascript"></script>

    <div id="home">
        <div id="user">
            <asp:FormView ID="fvInfo" CssClass="infotable tb-full" runat="server" CellPadding="0">
                <ItemTemplate>
                    <!-- 头像、基本信息 -->
                    <div class="ctn-p-b bb">
                        <h2 class="w5">
                            <strong><asp:Label CssClass="usertitle" ID="Label1" runat="server" Text='<%# Eval("NickName") %>'></asp:Label></strong>
                        </h2>
                        <%--<div id='statusarea'>
                            <img src="../Content/images/icons/chat_16.png" alt="" />
                            <asp:Label ID="lblStatus" CssClass="userstatus" runat="server" Text="用户简短状态"></asp:Label>
                        </div>--%>
                        <div class='litetext' id="visitcountarea">
                            <span>主页已被访问了<asp:Literal runat="server" Text='<%#Eval("VisitCount") %>' />次。</span>
                        </div>
                    </div>
                    <div class="fc">
                        <div class="left ctn-p-r">
                            <div class="left" id="avatararea">
                                <div class="left bdr-all ctn2">
                                    <cc:AvatarImage runat="server" ID="UserAvatarImage" AvatarType="Normal" AddHash="true"
                                        CssClass="frame" UserId='<%#Eval("UserId") %>' />
                                </div>
                                <div id="avatartools" class="clear">
                                    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="1" OnPreRender="MultiView1_PreRender">
                                        <asp:View ID="View1" runat="server">
                                            <table class="tb-full textcenter">
                                                <td>
                                                </td>
                                                <td>
                                                    <a href="javascript:OpenAddContact('<%=currentUserId %>')">加为好友</a>
                                                    <asp:Panel ID="Panel1" runat="server" ToolTip='<%# Eval("NickName", "请求加{0}为好友") %>'
                                                        CssClass="dialogform" Style="display: none;">
                                                        <div class="addcontactbox fc">
                                                            <div class="left ctn-p-r">
                                                                <myuc:ThumbAvatar ID="AvatarThumbnail1" runat="server" UserId='<%#Eval("UserId") %>'
                                                                    ShowNickName="false" />
                                                            </div>
                                                            <div>
                                                                <div id="presend">
                                                                    必须通过对方同意才能加为好友。
                                                                    <br />
                                                                    <div>
                                                                        好友请求附言:
                                                                        <br />
                                                                        <textarea id="txtRequestComment" rows="3" cols="20"></textarea>
                                                                    </div>
                                                                    <div class="actionarea textfar">
                                                                        <span id="sendrequestbutton" class="submitbutton ctn3">确定</span>
                                                                    </div>
                                                                </div>
                                                                <div id="postsend">
                                                                    <asp:Label ID="Label14" runat="server" Text='<%# Eval("NickName", "已经向{0}发出了好友请求。<br/>请等待{0}的回应。")%>'></asp:Label>
                                                                    <div class="actionarea textfar clear">
                                                                        <span class="closemodalformbutton">确定</span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </asp:Panel>
                                                </td>
                                            </table>
                                        </asp:View>
                                        <asp:View ID="View2" runat="server">
                                            <table class="tb-full textcenter">
                                                <tr>
                                                    <td>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:View>
                                    </asp:MultiView>
                                </div>
                            </div>
                        </div>
                        <div class="left">
                            <div>
                                <table style="width: 100%">
                                    <tr>
                                        <td style="width: 80px;">
                                            昵称:
                                        </td>
                                        <td>
                                            <asp:Label ID="Label5" runat="server" Text='<%#Eval("NickName") %>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            姓名:
                                        </td>
                                        <td>
                                            <asp:Label ID="Label2" runat="server" Text='<%#Eval("FullName") %>' />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            性别:
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            现居:
                                        </td>
                                        <td>
                                            <asp:Label ID="Label4" runat="server" Text='<%#Eval("Country")%>' />
                                            <asp:Label runat="server" Text='<%#Eval("Province")%>' />
                                            <asp:Label ID="Label3" runat="server" Text='<%#Eval("City")%>' />
                                        </td>
                                    </tr>
                                    <asp:PlaceHolder runat="server" ID="phInterests">
                                        <tr>
                                            <td>
                                                兴趣爱好:
                                            </td>
                                            <td>
                                                <asp:Label ID="Label6" runat="server" Text='<%#Eval("Interest")%>' />
                                            </td>
                                        </tr>
                                    </asp:PlaceHolder>
                                    <asp:PlaceHolder runat="server" ID="pnSpeciality">
                                        <tr>
                                            <td>
                                                领域专长:
                                            </td>
                                            <td>
                                                <asp:Label ID="Label7" runat="server" Text='<%#Eval("Speciality", " {0}")%>' />
                                            </td>
                                        </tr>
                                    </asp:PlaceHolder>
                                    <asp:PlaceHolder runat="server" ID="pnUrl">
                                        <tr>
                                            <td>
                                                网址:
                                            </td>
                                            <td>
                                                <asp:Label ID="Label8" runat="server" Text='<%#Eval("Url", "{0}")%>' />
                                            </td>
                                        </tr>
                                    </asp:PlaceHolder>
                                </table>
                            </div>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:FormView>
            <%--<div class="us">
                <h2 class="s1"><%=ta %>的动态</h2>
            </div>--%>
            <div class="ctn1">
                <h2 class="fc w5">
                    <div class="left">
                        <%=ta %>的活动</div>
                    <div class="right sz-s">
                        <a rel="ce" class="eventtab">
                            <%=ta %>发起的 (<asp:Literal ID="ltrCeCnt" runat="server"></asp:Literal>)</a> |
                        <a rel="je" class="eventtab">
                            <%=ta %>参与的 (<asp:Literal ID="ltrJeCnt" runat="server"></asp:Literal>)</a>
                    </div>
                </h2>
                <div class="eventarea">
                    
                    <div class='dce'>
                        
                        <asp:ListView ID="lvEvents" runat="server" InsertItemPosition="None">
                            <LayoutTemplate>
                                <div runat="server" id="itemPlaceholder" />
                            </LayoutTemplate>
                            <ItemTemplate>
                                <myuc:IconSet ID="IconSet1" runat="server" CssClass="nss ns-info" Text="只显示最近10条" />
                                <div class="item ctn1">
                                    <strong>
                                        <asp:HyperLink ID="Label9" runat="server" NavigateUrl='<%#Eval("EventId", "~/Mod/Events/View.aspx?id={0}") %>'
                                            Text='<%#Eval("Title") %>' /></strong>
                                    <asp:Label ID="Label13" CssClass="litetext" runat="server" Text='<%#Eval("Category", "[{0}]") %>'></asp:Label>
                                    <br />
                                    <span class="litetext">活动时间:</span>
                                    <asp:Label ID="Label10" runat="server" Text='<%#Eval("StartDate", "{0:MM月dd日 HH:mm}") %>'></asp:Label>
                                    -
                                    <asp:Label ID="Label11" runat="server" Text='<%#Eval("EndDate", "{0:MM月dd日 HH:mm}") %>'></asp:Label>
                                    <br />
                                    <span class="litetext">活动地点:</span>
                                    <asp:Label ID="Label12" runat="server" Text='<%#Eval("Place") %>'></asp:Label>
                                </div>
                            </ItemTemplate>
                            <ItemSeparatorTemplate>
                                <div class="hr1">
                                </div>
                            </ItemSeparatorTemplate>
                            <EmptyDataTemplate>
                                <span class="emptydata">
                                    <img src="../Content/images/icons/info_16.png" alt="" />
                                    目前没有发起任何活动。</span>
                            </EmptyDataTemplate>
                        </asp:ListView>
                    </div>
                    <div class='dje'>
                        <asp:ListView ID="lvJoinedEvents" runat="server" InsertItemPosition="None">
                            <LayoutTemplate>
                                <div runat="server" id="itemPlaceholder" />
                            </LayoutTemplate>
                            <ItemTemplate>
                                <div class="item ctn1">
                                    <strong>
                                        <asp:HyperLink ID="Label9" runat="server" NavigateUrl='<%#Eval("EventId", "~/Mod/Events/View.aspx?id={0}") %>'
                                            Text='<%#Eval("Title") %>' /></strong>
                                    <asp:Label ID="Label13" CssClass="litetext" runat="server" Text='<%#Eval("Category", "[{0}]") %>'></asp:Label>
                                    <br />
                                    <span class="litetext">活动时间:</span>
                                    <asp:Label ID="Label10" runat="server" Text='<%#Eval("StartDate", "{0:MM月dd日 HH:mm}") %>'></asp:Label>
                                    -
                                    <asp:Label ID="Label11" runat="server" Text='<%#Eval("EndDate", "{0:MM月dd日 HH:mm}") %>'></asp:Label>
                                    <br />
                                    <span class="litetext">活动地点:</span>
                                    <asp:Label ID="Label12" runat="server" Text='<%#Eval("Place") %>'></asp:Label>
                                </div>
                            </ItemTemplate>
                            <ItemSeparatorTemplate>
                                <div class="hr1">
                                </div>
                            </ItemSeparatorTemplate>
                            <EmptyDataTemplate>
                                <div class="emptydata">
                                    <img src="../Content/images/icons/info_16.png" alt="" />
                                    目前没有参与任何活动。</div>
                            </EmptyDataTemplate>
                        </asp:ListView>
                    </div>
                </div>
            </div>
            <div class="us">
                <h2 class="w5">
                    <%=ta %>的圈子</h2>
                <asp:ListView ID="lvGroups" runat="server" DataKeyNames="GroupId" GroupItemCount="2">
                    <GroupTemplate>
                        <tr>
                            <td runat="server" id="itemPlaceholder" />
                        </tr>
                    </GroupTemplate>
                    <LayoutTemplate>
                        <div class="ctn-p-t">
                            <table class="tb-full">
                                <tr runat="server" id="groupPlaceholder" />
                            </table>
                        </div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <td style="width: 50%;">
                            <div class="fc">
                                <div class="left ctn-p-r">
                                    <div class="left bdr-all" style="padding: .1em;">
                                        <cc:GroupAvatarImage ID="GroupAvatarImage1" Width="50" Height="50" AvatarType="Thumbnail" runat="server"
                                            GroupId='<%#Eval("GroupId") %>' AlternateText='' />
                                    </div>
                                </div>
                                <div class="left ctn-p-l">
                                    <asp:HyperLink ID="HyperLink2" runat="server" Text='<%#Eval("GroupName") %>' NavigateUrl='<%#Eval("GroupId", "~/Mod/Groups/ViewGroup.aspx?id={0}") %>'
                                        CssClass="sz-m"></asp:HyperLink><br />
                                </div>
                            </div>
                        </td>
                    </ItemTemplate>
                    <EmptyItemTemplate>
                        <td style="width: 50%;">
                        </td>
                    </EmptyItemTemplate>
                    <EmptyDataTemplate>
                        <div class="emptydata">
                            <img src="../Content/images/icons/info_16.png" alt="" />
                            目前没有加入任何圈子。</div>
                    </EmptyDataTemplate>
                </asp:ListView>
            </div>
            <div class="us ctn-p-t">
                <h2 class="w5">
                    <%=ta %>的分享</h2>
                <asp:ListView ID="lvThreads" runat="server">
                    <LayoutTemplate>
                        <div class="ctn-p-b">
                            <table class="tb-full">
                                <tr>
                                    <td align="center">
                                    </td>
                                    <td>
                                        <div class="nss ns-reply" title="回复">
                                        </div>
                                    </td>
                                    <td align="right">
                                        <div class="nss ns-clock" title="最后更新">
                                        </div>
                                    </td>
                                </tr>
                                <tr id="itemPlaceholder" runat="server" />
                            </table>
                            <div class="actionarea textfar">
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Mod/Talks/Default.aspx">»分享园区</asp:HyperLink>
                            </div>
                        </div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr class="trow">
                            <td class="tt">
                                &#8226;
                                <asp:HyperLink ID="MainPostIdLabel" runat="server" Text='<%# Eval("PostTitle") %>'
                                    NavigateUrl='<%#Eval("ThreadId", "~/Mod/Talks/Thread.aspx?t={0}&u=1") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Label3" runat="server" Text='<%#Convert.ToInt32(Eval("TotalPosts"))-1 %>'></asp:Label>
                            </td>
                            <td align="right">
                                <asp:Label ID="Label15" runat="server" Text='<%#Eval("LastUpdate") %>' CssClass="fd"></asp:Label>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <ItemSeparatorTemplate>
                        <tr>
                            <td colspan="3">
                                <div class="hr1">
                                </div>
                            </td>
                        </tr>
                    </ItemSeparatorTemplate>
                    <EmptyDataTemplate>
                        <div class="emptydata">
                            <img src="../Content/images/icons/info_16.png" alt="" />
                            目前没有发起任何话题。</div>
                    </EmptyDataTemplate>
                </asp:ListView>
            </div>
            <div class="us ctn-p-t">
                <h2 class="w5">
                    <%=ta %>的互助</h2>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <asp:ListView ID="lvLearnings" runat="server" DataSourceID="ldsLearnings">
                            <LayoutTemplate>
                                <div runat="server" id="itemPlaceholder">
                                </div>
                            </LayoutTemplate>
                            <EmptyDataTemplate>
                                <div class="emptydata">
                                    <img src="../Content/images/icons/info_16.png" alt="" />
                                    目前没有发起任何互助。</div>
                            </EmptyDataTemplate>
                            <ItemTemplate>
                                <div>
                                    <myuc:LearningProfileItem ID="LearningProfileItem1" runat="server" CssClass="learning-profile-b"
                                        LearningProfileDataItem='<%#Container.DataItem %>' />
                                </div>
                            </ItemTemplate>
                        </asp:ListView>
                        <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lvLearnings" PageSize="1">
                            <Fields>
                                <asp:NextPreviousPagerField ShowFirstPageButton="false" PreviousPageText="上一个" NextPageText="下一个"
                                    ButtonType="Link" />
                                <%--<asp:NextPreviousPagerField ShowLastPageButton="false" NextPageText="下一个" ButtonType="Link" />--%>
                            </Fields>
                        </asp:DataPager>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:LinqDataSource ID="ldsLearnings" runat="server">
                </asp:LinqDataSource>
            </div>
            <div class="ctn-p-t">
                <h2 class="w5">
                    留言板</h2>
                <div class="ctn1">
                    <myuc:CommentControl runat="server" ID="CommentControl1" EntityType="User" AppName="User" ContextName="Home" />
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ContentPlaceHolderID="RightSidebarContentPlaceHolder" runat="server"
    ID="RightSidebarContentPlaceHolder1">
    <asp:ListView ID="lvSide" runat="server">
        <LayoutTemplate>
            <div runat="server" id="itemPlaceholder" />
        </LayoutTemplate>
        <ItemTemplate>
            <div class="normal">
                <div class="ctn3">
                    <h2 class="w7">
                        谁来看过<%=ta%>
                    </h2>
                    <myuc:VisitList runat="server" CssClass="vh" ItemsPerRow="3" ShowVisitTime="true"
                        ID="VisitList1" ItemLimit="18" EntityType="User" NoVisitsText="目前没有人访问过。" ContextId='<%#Eval("UserId") %>' />
                </div>
                <div class="ctn-p-t ctn3">
                    <h2 class="w7">
                        <%=ta%>的好友</h2>
                    <myuc:ContactList ItemsPerRow="3" runat="server" CssClass="fc cl-left" ID="ContactList1" UserId='<%#Eval("UserId") %>' />
                    <div class="actionarea textfar">
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#Eval("UserId", "~/Home/Contacts.aspx?id={0}") %>'>&raquo;全部好友</asp:HyperLink>
                    </div>
                </div>
            </div>
        </ItemTemplate>
    </asp:ListView>
</asp:Content>
